package com.hmkx.app.service.impl;

import com.hmkx.app.dao.ArticlesDao;
import com.hmkx.app.entity.Articles;
import com.hmkx.app.service.ArticleService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.*;

@Service
public class ArticleServiceImpl  implements ArticleService {


    Logger log = LoggerFactory.getLogger(ArticleServiceImpl.class);

    @Resource
    private ArticlesDao articlesDao;


    @Override
    public Articles getArticleById(int id) {
        Articles articles = articlesDao.findById(Long.parseLong(String.valueOf(id))).orElse(null);
        return articles;
    }


}
